package com.android.fastride.model.db;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;

import com.android.fastride.model.db.greendao.DaoMaster;
import com.android.fastride.model.db.greendao.LoginLogDao;
import com.peng.android.coremodule.db.GreenDBUpdateHelper;


/**
 * 数据库辅助类
 * Created by pengyuantao on 2017/10/16 9:44.
 */

public class ControlSystemSQLiteHelper extends DaoMaster.OpenHelper {

	public ControlSystemSQLiteHelper (Context context, String name) {
		super(context, name);
	}

	public ControlSystemSQLiteHelper (Context context, String name, SQLiteDatabase.CursorFactory factory) {
		super(context, name, factory);
	}

	@Override
	public void onUpgrade (SQLiteDatabase db, int oldVersion, int newVersion) {
		//TODO:后续数据库更新，需要进行修改
		GreenDBUpdateHelper.migrate(db, LoginLogDao.class);
	}
}
